//! @Author: DengLibin 榆霖
//! @Date:  2022-07-05 11:22:35
//! @Description: 



use dao::{pojo::{PageInfo, DbParam, UserParam}, entity::user::User, user_dao};


/// @Author: DengLibin 榆霖
/// @Date:  2022-07-05 13:45:01
/// @Description: 分页查询
pub fn get_page(param: &DbParam) ->  Result<PageInfo<User>, Box<dyn std::error::Error>> {

    user_dao::get_page(param.page, param.size, &param.pool)
}

/// @Author: DengLibin 榆霖
/// @Date:  2022-07-05 13:45:01
/// @Description: 插入
pub fn insert(param: &UserParam) ->  Result<bool, Box<dyn std::error::Error>> {

    user_dao::insert(&param.user, &param.pool)
}
